package project;

public class test {
    public static void main(String[] args) {
        Students[] studentArray = new Students[]{
                new Students("张三",66,88),
                new Students("李四",98,100),
                new Students("王五",72,90),
                new Students("马六",65,76),
        };

        ArrayUtil.sort(studentArray, new ICompare() {
            @Override
            public int compare(Object o1, Object o2) {
                Students s1 = (Students) o1;
                Students s2 = (Students) o2;
                return s2.getChineseScore()-s1.getChineseScore();
            }
        });

        for (Students s:studentArray){
            System.out.println(s);
        }
    }
}


